package com.lb.config;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author zwf
 */
@Data
@Component
@ConfigurationProperties(prefix = "websocket.message")
public class MessageProperties {
    /**
     * 消息最大重试发送次数
     */
    private Integer maxRetrySendCount;
    /**
     * redis 订阅通道
     */
    private String subTopicName;

    public String getSubTopicName() {
        subTopicName= StringUtils.isEmpty(subTopicName)? MspConstants.DEFAULT_SUB_TOPIC_NAME:subTopicName;
        return subTopicName;
    }
}
